package middleware

import (
	"duoke/utils/response"
	"github.com/gin-gonic/gin"
)

func CommAuth() gin.HandlerFunc {
	return func(c *gin.Context) {
		// 登录验证
		utoken := c.DefaultQuery("token", "")
		if utoken != "duoyingkf-17703818645" {
			response.Response(c, 50008, "无权限访问", nil)
			c.Abort()
			return
		}
		c.Next()
	}
}
